home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / pp / popfile.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-01  |  1.0 KB  |  35 lines

  1. /*
  2. \funcref{popfile}{void popfile ()}
  3.     {}
  4.     {}
  5.     {}
  6.     {pushfile()}
  7.     {popfile.c}
  8.     {
  9.         Function {\em popfile()} is called from {\em process()} when the
  10.         currently processed file is at end-of-file. This is indicated
  11.         by the {\em lexer()} return value {\em l\_eof}.
  12.  
  13.         {\em popfile()} closes the file pointer associated with the processed
  14.         file and decreases the filestack pointer {\em filesp}. See {\em
  15.         pushfile()} for a description of the filestack.
  16.  
  17.         If the processed file is a file which is included by an {\em \#include}
  18.         directive, then a `\#' character is written to the output file. This
  19.         signals the next pass of {\em icmake}, the compiler, that an included
  20.         file ends. If the filestack is empty; i.e., when the processed file is
  21.         the main file, no `\#' is written to the output file.
  22.     }
  23. */
  24.  
  25. #include "icm-pp.h"
  26.  
  27. void popfile ()
  28. {
  29.     fclose (filestack [filesp].f);
  30.     filesp--;
  31.  
  32.     if (filesp != -1)
  33.         fprintf (outfile, "\n#\n");
  34. }
  35.